package arch.coal.ellipse.security.data;

import java.util.Vector;

public class ProfilePositionAndValue {
	
	private String entity;
	private String entry_type;
	private String district;
	private Item profile;
	private Vector posVec; //a Vector of Position objects
	private Position pos;
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append(" entity[").append(entity);
		sb.append("] entry_type[").append(entry_type);
		sb.append("] pos[").append(pos.getPosition());
		sb.append("]=[").append(pos.getValue());
		
		return sb.toString();
	};
	
	public String getEntity() {
		return entity;
	}
	public void setEntity(String entity) {
		this.entity = entity;
	}
	
	public String getEntry_type() {
		return entry_type;
	}
	public void setEntry_type(String entry_type) {
		this.entry_type = entry_type;
	}
	
	public Position getPos() {
		return pos;
	}
	public void setPos(Position pos) {
		this.pos = pos;
	}

	public Vector getPosVec() {
		return posVec;
	}
	public void setPosVec(Vector posVec) {
		this.posVec = posVec;
	}
	
	public String getPosVecString() {
		
		StringBuffer sb = new StringBuffer();
		
		if( posVec != null && posVec.size() > 0) {
			
			for(int index=0; index<posVec.size(); index++) {
				Position p = (Position) posVec.get(index);
				sb.append(p.getPosition() + ",");
				sb.append( p.getPosition() + "|" + p.getValue() );
				
				if( index < posVec.size()-1 ) {
					sb.append(",");
				}
			}
		}
		
		return sb.toString(); 
	}

	public String getDistrict() {
		return district;
	}
	public void setDistrict(String district) {
		this.district = district;
	}

	public Item getProfile() {
		return profile;
	}

	public void setProfile(Item profile) {
		this.profile = profile;
	}

}
